class AddQuoteData < ActiveRecord::Migration
  def self.up
    html_code = IO.read('db/migrate/data/quotes.htm')
    data = html_code.split(/<p>/)
    a = 0
    while a < data.size
      Quotation.create(:content => data[a], :author => data[a+1])
      a += 2
    end
  end

  def self.down
    Quotation.delete_all
  end
end
